<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/html">
<head>
    <meta name="renderer" content="webkit|ie-comp|ie-stand"/>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"/>
    <title>碧叶之源</title>
<#--<meta name="keywords" content="关键词,5个左右,单个8汉字以内">-->
    <meta name="keywords" content="用户新增"/>
<#--<meta name="description" content="网站描述，字数尽量空制在80个汉字，160个字符以内！">-->
    <meta name="description" content="欢迎进入碧叶之源！"/>


<#--妹子UI-->
    <link type="text/css" rel="stylesheet" href="/plugin/amaze/css/amazeui.min.css"/>
    <link type="text/css" rel="stylesheet" href="/plugin/amaze/css/amazeui.datatables.min.css"/>
    <link type="text/css" rel="stylesheet" href="/plugin/amaze/css/app.css">

<#--自己的样式-->
    <link type="text/css" rel="stylesheet" href="/css/ztree/main.css">
    <style type="text/css">

    </style>

</head>


<body>


<body data-type="widgets">

<div class="am-g tpl-g">


    <div class="row-content am-cf">


        <div class="row">

            <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                <div class="widget am-cf">
                    <div class="widget-head am-cf">
                    <#if (viewType!'') == "1">
                        <div class="widget-title am-fl">用户查看</div>
                    <#elseif (viewType!'') == "2">
                        <div class="widget-title am-fl">用户修改</div>
                    <#elseif (viewType!'') == "3">
                        <div class="widget-title am-fl">用户新增</div>
                    </#if>
                        <div class="widget-function am-fr">
                            <a href="javascript:;" class="am-icon-cog"></a>
                        </div>
                    </div>
                    <div class="widget-body am-fr">

                        <form class="am-form tpl-form-border-form tpl-form-border-br" id="formUser">
                            <#--注册类型-->
                            <input type="hidden" id="createType" name="createType" value="2">
                            <input type="hidden" id="userId" name="userId" value="${userEdit.id!''}">


                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">隶属岗位<span
                                        class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-3">
                                    <input type="text" disabled class="tpl-form-input" value="${post.name!''}">
                                    <input type="hidden" id="postId" name="postId" class="tpl-form-input" value="${post.id!''}">
                                    <small><span class="required"> * </span>用户属于的岗位。</small>
                                </div>
                                <label for="user-name" class="am-u-sm-1 am-form-label">头像</label>
                                <div class="am-u-sm-2" >
                                    <#--图片预览容器-->
                                    <div id="containerImg" style="width: 75px;height: 75px;border:1px solid #167fa1" >
                                        <#if (userEdit.imgHred!'')?? && ((userEdit.imgHred!'') != "") >
                                            <img src="/user/getImgHred?id=${userEdit.imgHred!''}" style="width:75px;height:75px;">
                                        <#else >
                                            <img src="/img/common/worker.png" style="width:75px;height:75px;">
                                        </#if>
                                    </div>
                                    <small>用户的头像，非必须。</small>
                                </div>
                                <div class="am-u-sm-3" >
                                    <input type="file" class="tpl-form-input" id="imgUserFile" name="imgUserFile" onchange="imgContainerView()"  placeholder="用户头像" />
                                    <small>用户的头像，非必须。</small>
                                </div>
                            </div>

                            <#--<div class="am-form-group" >
                                <label for="user-name" class="am-u-sm-3 am-form-label">头像</label>
                                <div class="am-u-sm-9">
                                &lt;#&ndash;图片预览容器&ndash;&gt;
                                    <div id="containerImg" style="width: 75px;height: 75px;"></div>
                                    <input type="file" class="tpl-form-input" id="imgUserFile" name="imgUserFile" onchange="imgContainerView()"  placeholder="用户头像" />
                                    <small>用户的头像，非必须。</small>
                                </div>
                            </div>-->

                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">登录用户名<span
                                        class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" id="logName" name="logName" value="${userEdit.logName!''}" placeholder="请输入岗位|职位 名称">
                                    <small><span class="required"> * </span>用于登录的账户名，有且唯一。</small>
                                </div>
                            </div>



                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">姓名<span
                                        class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" id="name" name="name" value="${userEdit.name!''}" placeholder="请输入岗位|职位 名称">
                                    <small><span class="required"> * </span>用户的姓名。</small>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">密码<span
                                        class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-9">
                                    <#if ((userEdit.password!'')??) && ((userEdit.password!'') == '')>
                                        <input type="text" class="tpl-form-input" id="password" name="password" value="${userEdit.password!''}" placeholder="请输入密码">
                                    <#else >
                                        <#--<input type="password" readonly="readonly" class="tpl-form-input" id="password" name="password" value="${userEdit.password!''}" placeholder="请输入密码">-->
                                        <input type="password"  class="tpl-form-input" id="password" name="password" value="${userEdit.password!''}" placeholder="请输入密码">
                                    </#if>
                                    <small><span class="required"> * </span>用户初始化的密码,用于用户登录。</small>
                                </div>
                            </div>


                            <hr/>

                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">是否在职<span class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-9">
                                    <input type="radio" <#if ((userEdit.isDimission!'') == '1')>checked </#if> id="isDimission1" name="isDimission"  value="1" /> 在职
                                    <input type="radio" <#if ((userEdit.isDimission!'') == '2')>checked </#if> id="isDimission2" name="isDimission"  value="2" /> 离职
                                    <br/>
                                    <small>请选择是否在职。</small>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">行政级别<span class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-9">
                                    <select onclick="getMovingData(this, &quot;<option class='selectOpenStyle' value='-1'>请选择行政级别</option>&quot;, &quot;10&quot;, &quot;levelAdministrative&quot;)" id="levelAdministrative" name="levelAdministrative">
                                        <#if ((userEdit.levelAdministrative!'')??) && ((userEdit.levelAdministrative!'') == '')>
                                            <option class="selectOpenStyle" value="-1">请选择行政级别</option>
                                        <#else >
                                            <option class="selectOpenStyle" value="${userEdit.levelAdministrative!''}">${baseInfoLevelAdministrative.key!''}</option>
                                        </#if>
                                    </select>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">职业类型<span class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-9">
                                    <select onclick="getMovingData(this, &quot;<option class='selectOpenStyle' value='-1'>请选择职业类型</option>&quot;, &quot;9&quot;, &quot;administrativeType&quot;)" id="administrativeType" name="administrativeType">
                                        <#if ((userEdit.administrativeType!'')??) && ((userEdit.administrativeType!'') == '')>
                                            <option class="selectOpenStyle" value="-1">请选择职业类型</option>
                                        <#else >
                                            <option class="selectOpenStyle" value="${userEdit.administrativeType!''}">${baseInfoAdministrativeType.key!''}</option>
                                        </#if>
                                    </select>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">是否党员<span class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-9">
                                    <input type="radio" <#if ((userEdit.isParty!'') == '1')>checked </#if> id="isParty1" name="isParty"  value="1" /> 是
                                    <input type="radio" <#if ((userEdit.isParty!'') == '2')>checked </#if> id="isParty2" name="isParty"  value="2" /> 否
                                    <br/>
                                    <small>请选择是否党员。</small>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">入党时间<span class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="am-form-field tpl-form-no-bg" id="addParty" name="addParty" value="${(userEdit.addParty?string('yyyy-MM-dd'))!''}" placeholder="请填写入党时间" />
                                    <small>用户入党时间。</small>
                                </div>
                            </div>



                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">任职开始时间<span class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="am-form-field tpl-form-no-bg" id="serveTime" name="serveTime" value="${(userEdit.serveTime?string('yyyy-MM-dd'))!''}" placeholder="请填写任职开始时间(最后担任的职务)" />
                                    <small>用户(最后担任的职务)任职开始时间。</small>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">离职|退休时间<span class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="am-form-field tpl-form-no-bg" id="dimissionDate" name="dimissionDate" value="${(userEdit.dimissionDate?string('yyyy-MM-dd'))!''}" placeholder="请填写离职|退休时间" />
                                    <small>用户如果已经离职、退休、等情况，请输入该时间。</small>
                                </div>
                            </div>


                            <hr/>



                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">性别<span class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-9">
                                    <input type="radio" id="sex1" name="sex" <#if ((userEdit.sex!'') == '1')>checked </#if>  value="1" /> 男
                                    <input type="radio" id="sex2" name="sex" <#if ((userEdit.sex!'') == '2')>checked </#if>  value="2" /> 女
                                    <br/>
                                    <small>用户的性别。</small>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">生日<span class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="am-form-field tpl-form-no-bg" id="birthday" name="birthday" value="${(userEdit.birthday?string('yyyy-MM-dd'))!''}" placeholder="请填写生日" />
                                    <small>用户的生日。</small>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">民族<span class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-9">
                                    <select onclick="getMovingData(this, &quot;<option class='selectOpenStyle' value='-1'>请选择民族</option>&quot;, &quot;7&quot;, &quot;ethnic&quot;)" id="ethnic" name="ethnic">
                                        <#if ((userEdit.ethnic!'')??) && ((userEdit.ethnic!'') == '')>
                                            <option class="selectOpenStyle" value="-1">请选择民族</option>
                                        <#else >
                                            <option class="selectOpenStyle" value="${userEdit.ethnic!''}">${baseinfoEthnic.key!''}</option>
                                        </#if>
                                    </select>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">请选择地区<span class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-3">
                                    <input type="hidden" id="provinceData" value="${userEdit.province!''}"/>
                                    <input type="hidden" id="cityData" value="${userEdit.city!''}" />
                                    <input type="hidden" id="countyData" value="${userEdit.county!''}" />
                                    省份：<select id="province" name="province" onchange="onProvince()"></select>
                                    城市：<select id="city" name="city" onchange="onCity()"></select>
                                    县区：<select id="county" name="county" onchange="onCounty()"></select>
                                </div>
                                <div style="width: 500px;height:480px;border:1px solid #167fa1" id="map" class="am-u-sm-6">
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">详细地址<span
                                        class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" id="addDetails" name="addDetails" value="${userEdit.addDetails!''}" placeholder="请输入详细地址">
                                    <small>用户详细地址。</small>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">毕业院校<span
                                        class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" id="school" name="school" value="${userEdit.school!''}" placeholder="请输入毕业院校">
                                    <small>用户最高学历毕业院校。</small>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">专业<span
                                        class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" id="profession" name="profession" value="${userEdit.profession!''}" placeholder="请输入专业">
                                    <small>用户从事专业或者毕业院校所属专业。</small>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">邮箱<span
                                        class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" id="email" name="email" value="${userEdit.email!''}" placeholder="请输入邮箱">
                                    <small>用户联系邮箱。</small>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">备注<span
                                        class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-9">
                                    <textarea rows="3" class="tpl-form-input" cols="20" id="remark" name="remark"  placeholder="备注信息">${userEdit.remark!''}</textarea>
                                    <small>用户备注信息。</small>
                                </div>
                            </div>


                            <hr/>

                            <div class="am-form-group">
                                <div class="am-u-sm-9 am-u-sm-push-6">
                                    <#if (viewType!'') == "1">
                                        <#--<button type="button" class="am-btn am-btn-success" onclick="colsePage()">确认</button>&nbsp;&nbsp;-->
                                    <#elseif (viewType!'') == "2">
                                        <button type="button" class="am-btn am-btn-success" onclick="updateUser()">修改</button>&nbsp;&nbsp;
                                    <#elseif (viewType!'') == "3">
                                        <button type="button" class="am-btn am-btn-success" onclick="addUser()">添加</button>&nbsp;&nbsp;
                                    </#if>
                                    &nbsp;&nbsp;
                                    <button type="button" class="am-btn am-btn-warning" onclick="colsePage()">关闭</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>


    </div>








<#--JS 部分 -->
    <script type="text/javascript" src="/js/common/jquery.min.js"></script>
    <script type="text/javascript" src="/js/common/base.js"></script>
<#--妹子UI-->
    <script type="text/javascript" src="/plugin/amaze/js/amazeui.min.js"></script>
    <script type="text/javascript" src="/plugin/amaze/js/app.js"></script>
    <script type="text/javascript" src="/plugin/amaze/js/theme.js"></script>
<#--layer.js，只需要引入这个，css会自动引入-->
    <script type="text/javascript" src="/plugin/layer-v3.1.1/layer.js"></script>
<#--laydate.js 时间组件-->
    <script type="text/javascript" src="/plugin/laydate/laydate.js"></script>

    <#--地图的数据-->
    <script type="text/javascript" src="/plugin/map/area.js"></script>
    <#--百度地图js-->
    <script type="text/javascript" src="/plugin/map/map.js"></script>
    <#--三级联动的JS-->
    <script type="text/javascript" src="/plugin/map/provincialCitiesAndCounties.js"></script>

    <#--自定义相关的js    -->
    <script type="text/javascript" src="/js/ztree/mian-user.js"></script>
<#--自己的js-->
    <script type="text/javascript">

        // 当是查看的时候，不允许操作数据
        <#if (viewType!'') == "1">
            $(":input").attr("disabled","true");
        </#if>

    </script>


</body>


</html>
